home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gigarom 1
/
Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso
/
FILES
/
DEV
/
C-H
/
Discipline2.0.2.sit
/
Discipline 2.0.2
/
Discipline Examples
/
AddrTest.c
next >
Wrap
Text File
|
1991-04-09
|
1KB
|
48 lines
#include <Types.h>
#include <Memory.h>
#include <QuickDraw.h>
#include <Packages.h>
#include <Strings.h>
#include <SysEqu.h>
#include <ToolUtils.h>
#include <Traps.h>
#include "Wimpy.h"
//the call to testAddr
pascal char * theTest (long * selector)
{
switch (selector[0])
{
case 0:
/* return test name */
return("AddressTst");
break;
case 1: /*return test description , including test parameters in “” */
return("Check “testee,1,L” points to valid memory.");
break;
case 2: /*do guts of test or make call to actual test proceduure */
return testAddr((Ptr)selector[1]);
/*in test return a string for the test*/
/*failing or nil for test passes */
break;
default :
return (nil);
break;
};
}
/*
make instructions
c AddrTst.c -r -b -t -sym off -mbg off -s someSegName -o AddrTst.c.o
c AddrTst2.c -r -b -t -sym off -mbg off -s someSegName -o AddrTst2.c.o
link -mf -rt dsct=1044 -sg AddressTst="Main" -m "THETEST" ∂
-sym off ∂
"AddrTst.c.o" ∂
"AddrTst2.c.o" ∂
-o "Discipline Startup"
make sure the dsct number is unique and the segment name is the same as the test name
*/